package com.rookie.im.learn.io.mq.consumer.topic;

import com.rookie.im.learn.io.mq.config.RabbitMQConfig;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RabbitListener(queuesToDeclare = @Queue(RabbitMQConfig.RABBITMQ_DEMO_TOPIC_EXCHANGE_QUEUE_C))
public class ConsumerServiceTopicC {
    @RabbitHandler
    public void process(Map<String, Object> map) {
        System.out.println("收到队列C消息: " + map);
    }
}
